package za.ac.cput.arrowgame.service.requesthandler;

import za.ac.cput.arrowgame.app.exceptions.InvalidInput;
import za.ac.cput.arrowgame.app.exceptions.Win;
import za.ac.cput.arrowgame.model.Grid;

abstract public class Handler {
    
    protected Handler successorHandler;

    public void setSuccessorHandler(Handler successorHandler) {
        this.successorHandler = successorHandler;
    }

    public Handler getSuccessorHandler() {
        return successorHandler;
    }
    
    public abstract Grid handleRequest(Command command, Grid gridModel) throws InvalidInput, Win, InterruptedException;
}
